package com.eastfair.auth.api;

import com.eastfair.auth.dto.OrganizationDTO;
import com.eastfair.auth.dto.OrganizationRoleDto;
import com.eastfair.auth.dto.UserOrganizationDTO;
import com.eastfair.auth.entity.Organization;
import com.eastfair.auth.entity.UserOrganization;
import com.eastfair.auth.hystrix.AuthApiFallback;
import com.eastfair.auth.hystrix.RoleApiFallback;
import com.eastfair.auth.vo.ResourceOrganizationVo;
import com.eastfair.auth.vo.RoleVo;
import com.eastfair.core.base.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * auth feign接口
 *
 * @Author ligang
 * @Date 2021/7/16 16:41
 */
@FeignClient(name = "auth/role", fallback = RoleApiFallback.class)
public interface RoleServiceFeign {

    /**
     * 批量查询角色信息
     * @param ids 菜单id
     * @return 查询结果
     */
    @ApiOperation(value = "批量查询角色信息", notes = "批量查询角色信息")
    @PostMapping("/findAllByIds")
    R<List<RoleVo>> findAllByIds(@RequestBody List<Long> ids);

    /**
     * 复制角色
     * @param roleVoList 角色集合
     * @return
     */
    @ApiOperation(value = "复制角色", notes = "复制角色")
    @PostMapping("/copyRole")
    R<List<RoleVo>> copyRole(@RequestBody List<RoleVo> roleVoList);

}
